package edu.taru.service.impl;

import edu.taru.mapper.DepartmentMapper;
import edu.taru.pojo.Department;
import edu.taru.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class DepartmentServiceImpl implements DepartmentService {

    private DepartmentMapper dmapper;

    @Autowired
    public DepartmentServiceImpl(DepartmentMapper dmapper){
        this.dmapper = dmapper;
    }

    /**
     * 查询部门所有信息
     * @return
     */
    @Override
    public List<Department> listDepts() {
        return dmapper.listDepts();
    }
}
